(function(window, $) {
	$(function() {
		$('form').bootstrapValidator({
            feedbackIcons : {
                valid : 'fa fa-check',
                invalid : 'fa fa-remove',
                validating : 'fa fa-refresh'
            }
        }).on('success.form.bv', function(e) {
            e.preventDefault();
            var $form = $(e.target);
            $('#password').val($.md5($('#password1').val()));
            var data = $form.find('[name]:not([exclude])').serialize()
            $.ajax({
                url : $form.attr('action') || '',
                type : $form.attr('method') || 'post',
                dataType : 'json',
                data : data,
                success : function(rs){
                    base.ajaxBack(rs, function(){
                        setTimeout(function(){
                        	location.replace($('#from').val());
                       	}, 1000);
                    });
                }
            });
        });
	});
})(this, jQuery)